<template>
  <div class="rightBlock">
    <div>
      <span>左侧id：</span>
      {{ contractRight.id }}
    </div>
    <div>
      <span>左侧name：</span>
      {{ contractRight.name }}
    </div>
    <div>
      <span>修改过后的name：</span>
      <input type="text" v-model="value" @keyup.enter="changeShow" />
    </div>
  </div>
</template>
<script>
export default {
  props: {
    contractRight: {
      type: Object,
      default: () => {
        return {
          name: ''
        }
      }
    }
  },
  data() {
    return {
      value: ''
    }
  },
  methods: {
    changeShow() {
      // this.$emit('function', name)
      this.contractRight.name = this.value
    }
  }
}
</script>
<style lang="scss" scoped>
.rightBlock {
  background-color: rgb(245, 244, 243);
  width: 100%;
  height: 100%;
}
</style>
